package com.wu.wechat.controller;

import com.wu.common.utils.Result;
import com.wu.service.weixin.service.WxHuoDongService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/wechat/huodong")
public class HuodongController {

    @Autowired
    private WxHuoDongService wxHuoDongService;

    @GetMapping("release")
    @Operation(summary = "发布")
    @PreAuthorize("hasAuthority('sys:wx:huodong:release')")
    public Result<String> release(@RequestBody List<Long> idList){
        wxHuoDongService.release(idList);
        return Result.ok();
    }

}
